﻿@using Century.Web.Security.Authorizations;
@using Century.Web.Security;
@using Century.Model;
@{
    Layout = null;
}

<ul>
    <li><a href="/Admin">
        <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/home.png")" />Home</a></li>
    <li><a href="javascript:alert('Under construction');">
        <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/about.png")" />About</a></li>

    @if (CenturyAuthorization.Authorize( new ActionModule { Name = "Administration", DisplayName = "Administration" })) {
    <li>
        <span><img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/admin.png")" alt="Century" />Administration</span>
        <ul>
            <li><a href="@Url.Action("Index", "UserRoleManagement")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/user_role.png")" alt="Century" />User
                Role Management</a>
            </li>
            <li><a href="@Url.Action("Index", "RoleActionModuleManagement")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/role_perm.png")" alt="Century" />Role
                ActionModule Management</a>
            </li>
            <li><a href="@Url.Action("Index", "UserSiteManagement")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/user_site.png")" alt="Century" />User
                Site Management</a>
            </li>
        </ul>
    </li>
    }
    
    @if (CenturyAuthorization.Authorize( new ActionModule { Name = "System", DisplayName = "System" })) {
    <li><span>
        <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/system.png")" />System</span><ul>

            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "ConfManager", DisplayName = "Config Manager" })) {
            <li><a href="@Url.Action("Index", "ConfManager")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/config.png")" />Config Manager</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "Log", DisplayName = "Log Viewer" })) {
            <li><a href="@Url.Action("Index", "Log")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/log_view.png")" />Log Viewer</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "SiteConfiguration", DisplayName = "Site Configuration" })) {
            <li><a href="@Url.Action("Index", "SiteConfiguration")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/site_manage.png")" />Site Configuration</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "SiteResources", DisplayName = "Site Resource" })) {
            <li><a href="@Url.Action("Index", "SiteResources")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/site_resource.png")" />Site Resource</a></li>
            }

            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "CacheReloader", DisplayName = "Cache Reloader" })) {
            <li><a href="javascript:alert('under construction');">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/cache.png")" />Cache Reloader</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "CountrySiteScript", DisplayName = "Country Site Script Manager" })) {
            <li><a href="@Url.Action("Index", "CountrySiteScript")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/config.png")" />Country Site Script Manager</a></li>
            }
            
        </ul>
    </li>
    }
    

    @if (CenturyAuthorization.Authorize( new ActionModule { Name = "Email", DisplayName = "Email" })) {
    <li><span>
        <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/email.png")" />Email</span><ul>
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "ImportEmailTemplate", DisplayName = "Import Template" }))
            {
            <li><a href="javascript:alert('under construction');">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/import.png")" />Import Template</a></li>
            }
        </ul>
    </li>
    }
    
    @if (CenturyAuthorization.Authorize( new ActionModule { Name = "ContentManagement", DisplayName = "Content Management" }))
    {
    <li><span>
        <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/content.png")" />Content Management</span><ul>

            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "SiteManager", DisplayName = "Site Management" }))
            {
            <li><a href="@Url.Action("Get", "PageManagement")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/site_manage.png")" />Site Management</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "Label", DisplayName = "Label Translation" }))
            {
            <li><a href="@Url.Action("Index", "TranslationTextManager")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/content-manage.png")" />Label Translation</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "GenericNews", DisplayName = "News Management" }))
            {
            <li><a href="@Url.Action("Index", "GenericNews")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/news.png")" />News Management</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "Mt4FAQ", DisplayName = "Mt4FAQ Questions" }))
            {
            <li><a href="@Url.Action("Index", "Mt4FAQ")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/mt4.png")" />FAQ Questions</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "Glossary", DisplayName = "Glossary Management" }))
            {
            <li><a href="@Url.Action("Index", "Glossary")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/news.png")" />Glossary Management</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "Webinar", DisplayName = "Webinar" }))
            {
            <li><a href="@Url.Action("GetWebinarList", "GenericNews")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/Webinar.png")" />Webinar</a></li>
            }
            
            @if (CenturyAuthorization.Authorize( new ActionModule { Name = "EmailTemplate", DisplayName = "Email Templates" }))
            {
            <li><a href="@Url.Action("Index", "EmailTemplate")">
                <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/fsa.png")" />Email Templates</a></li>
            }


        </ul>
    </li>
    }
    
    
    @if(User.Identity.IsAuthenticated) {
        <li><span class="last">
            <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/member.png")" alt="Member Area"/>Member
            Area</span><ul>
                <li><a href="@Url.Action("ChangePassword", "Account", new { area="" })">
                    <img src="@Url.Content("~/Areas/Admin/content/themes/admin/img/icons/pass.png")" alt="Change Password"/>Change
                    Password</a></li>
            </ul>
        </li>
    }
</ul>

    
